package com.xuhao.didi.core.iocore.interfaces;

import java.io.InputStream;

/**
 * Created by xuhao on 2017/5/16.
 */

public interface IReader<T extends IIOCoreOptions> {
    /**
     * 初始化
     *
     * @param inputStream 读取
     * @param stateSender 发送的数据
     */
    void initialize(InputStream inputStream, IStateSender stateSender);

    /**
     * 读取
     *
     * @throws RuntimeException 异常
     */
    void read() throws RuntimeException;

    /**
     * 设置
     *
     * @param option 泛型
     */
    void setOption(T option);

    /**
     * 关闭
     */
    void close();
}
